import { sm2 } from "sm-crypto";

const cipherMode = 1;
const public_key =
  "04B361588A266875976B105895C2E2385D8535A2CAC28E2883392430ACF961837681318316D3AB40E45336D194FDC2A75EEF43A3692046C15DD69C6D9DB5AA21C7";
// 加密
export function encrypt(txt) {
  return "04" + sm2.doEncrypt(txt, public_key, cipherMode);
}
